﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using WF.Common;

namespace WF.Web.Pages.Workflow.KQ
{
    public partial class KQApplyView : BasePage
    {
        public string kqapplyID = "";
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                LoadFormViewData();
            }
            FormView1.DataBind();

            ((HyperLink)FormView1.FindControl("lnkView")).NavigateUrl = "Attachment.aspx?KQAPPLYID=" + kqapplyID;
            ((HyperLink)FormView1.FindControl("lnkView")).Attributes.Add("onclick", "return ShowDialog(this, 650, 450, '');");
        }

        public void LoadFormViewData()
        {
            if (Request.QueryString["ID"] != null)
            {
                string rid = (string)Request.QueryString["ID"];
                kqapplyID = rid;

                ObjectDataSource1.SelectParameters["ID"].DefaultValue = rid;
            }
            else
            {
                throw new BusinessException("编号不存在");
            }

        }
    }
}